home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Codex ass dev system v1.10.adf / include / workbench / workbench.i < prev    next >
Text File  |  1988-09-19  |  6KB  |  169 lines

  1.  
  2. *********************************************************************
  3. *
  4. * workbench.h
  5. *
  6. * Commodore-Amiga, Inc.
  7. *
  8. * $Header: workbench.i,v 31.2 85/09/02 21:32:18 neil Exp $
  9. *
  10. * $Locker:  $
  11. *
  12. *********************************************************************
  13.  
  14.    IFND  EXEC_TYPES_I
  15.    INCLUDE  "exec/types.i"
  16.    ENDC  !EXEC_TYPES_I
  17.  
  18.    IFND  EXEC_NODES_I
  19.    INCLUDE  "exec/nodes.i"
  20.    ENDC  !EXEC_NODES_I
  21.  
  22.    IFND  EXEC_LISTS_I
  23.    INCLUDE  "exec/lists.i"
  24.    ENDC  !EXEC_LISTS_I
  25.  
  26.    IFND  EXEC_TASKS_I
  27.    INCLUDE  "exec/tasks.i"
  28.    ENDC  !EXEC_TASKS_I
  29.  
  30.    IFND  INTUITION_INTUITION_I
  31.    INCLUDE  "intuition/intuition.i"
  32.    ENDC  !INTUITION_INTUITION_I
  33.  
  34.  
  35. ; the Workbench object types
  36. WBDISK      EQU   1
  37. WBDRAWER    EQU   2
  38. WBTOOL      EQU   3
  39. WBPROJECT   EQU   4
  40. WBGARBAGE   EQU   5
  41. WBDEVICE    EQU   6
  42. WBKICK      EQU   7
  43.  
  44.  
  45. ; the main workbench object structure
  46.  STRUCTURE DrawerData,0
  47.     STRUCT  dd_NewWindow,nw_SIZE ; args to open window
  48.     LONG    dd_CurrentX    ; current x coordinate of origin
  49.     LONG    dd_CurrentY    ; current y coordinate of origin
  50.     LONG    dd_MinX        ; smallest x coordinate in window
  51.     LONG    dd_MinY        ; smallest y coordinate in window
  52.     LONG    dd_MaxX        ; largest x coordinate in window
  53.     LONG    dd_MaxY        ; largest y coordinate in window
  54.     STRUCT  dd_HorizScroll,gg_SIZEOF
  55.     STRUCT  dd_VertScroll,gg_SIZEOF
  56.     STRUCT  dd_UpMove,gg_SIZEOF
  57.     STRUCT  dd_DownMove,gg_SIZEOF
  58.     STRUCT  dd_LeftMove,gg_SIZEOF
  59.     STRUCT  dd_RightMove,gg_SIZEOF
  60.     STRUCT  dd_HorizImage,ig_SIZEOF
  61.     STRUCT  dd_VertImage,ig_SIZEOF
  62.     STRUCT  dd_HorizProp,pi_SIZEOF
  63.     STRUCT  dd_VertProp,pi_SIZEOF
  64.     APTR    dd_DrawerWin      ; pointer to drawers window
  65.     APTR    dd_Object      ; back pointer to drawer object
  66.     STRUCT  dd_Children,LN_SIZE  ; where our children hang out
  67.     LONG    dd_Lock
  68.     LABEL   dd_SIZEOF
  69.  
  70. ; the amount of DrawerData actually written to disk
  71. DRAWERDATAFILESIZE   EQU (nw_SIZE+2*(4))
  72.  
  73.  
  74.  STRUCTURE DiskObject,0
  75.     UWORD   do_Magic       ; a magic num at the start of the file
  76.     UWORD   do_Version     ; a version number, so we can change it
  77.     STRUCT  do_Gadget,gg_SIZEOF  ; a copy of in core gadget
  78.     UWORD   do_Type
  79.     APTR    do_DefaultTool
  80.     APTR    do_ToolTypes
  81.     LONG    do_CurrentX
  82.     LONG    do_CurrentY
  83.     APTR    do_DrawerData
  84.     APTR    do_ToolWindow     ; only applies to tools
  85.     LONG    do_StackSize      ; only applies to tools
  86.     LABEL   do_SIZEOF
  87.  
  88. WB_DISKMAGIC   EQU   $e310 ; a magic number, not easily impersonated
  89. WB_DISKVERSION EQU   1  ; our current version number
  90.  
  91.  STRUCTURE FreeList,0
  92.     WORD    fl_NumFree
  93.     STRUCT  fl_MemList,LH_SIZE
  94.     ; weird name to avoid conflicts with FileLocks
  95.     LABEL   FreeList_SIZEOF
  96.  
  97.  
  98.  STRUCTURE WBObject,0
  99.     STRUCT  wo_MasterNode,LN_SIZE   ; all objects are on this list
  100.     STRUCT  wo_Siblings,LN_SIZE     ; list of drawer members
  101.     STRUCT  wo_SelectNode,LN_SIZE   ; list of all selected objects
  102.     STRUCT  wo_UtilityNode,LN_SIZE  ; function specific linkages
  103.     APTR wo_Parent
  104.  
  105.     ; object flags -- see below for definitions
  106.     UBYTE   wo_Flags
  107.  
  108.     UBYTE   wo_Type           ; what flavor object is this?
  109.     USHORT  wo_UseCount       ; number of references to this obj
  110.     APTR    wo_Name           ; this object's textual name
  111.     SHORT   wo_NameXOffset    ; where to put the name
  112.     SHORT   wo_NameYOffset
  113.  
  114.     APTR    wo_DefaultTool
  115.     APTR    wo_DrawerData     ; if this is a drawer or disk
  116.     APTR    wo_IconWin        ; each object's icon lives here
  117.     LONG    wo_CurrentX       ; virtual X in drawer
  118.     LONG    wo_CurrentY       ; virtual Y in drawer
  119.     APTR    wo_ToolTypes      ; the types for this tool
  120.     STRUCT  wo_Gadget,gg_SIZEOF  ; NOT a ptr, but an instance of it
  121.     STRUCT  wo_FreeList,FreeList_SIZEOF   ; this objects free list
  122.     APTR    wo_ToolWindow     ; character string for tool's window
  123.     LONG    wo_StackSize      ; how much stack to give to this
  124.     LONG    wo_Lock           ; if this tool is in the backdrop
  125.     LABEL   wo_SIZEOF
  126.  
  127.     ; workbench object flags
  128.     BITDEF  WO,IconDisp,7     ; icon is currently in a window
  129.     BITDEF  WO,DrawerOpen,6   ; we're a drawer, and it is open
  130.     BITDEF  WO,Selected,5     ; our icon is selected
  131.     BITDEF  WO,Background,4   ; set if icon is in background
  132.  
  133.  
  134. * each message that comes into the WorkBenchPort must have a type field
  135. * in the preceeding short.  These are the defines for this type
  136. *
  137.  
  138. MTYPE_PSTD        EQU   1  ; a "standard Potion" message
  139. MTYPE_TOOLEXIT    EQU   2  ; exit message from our tools
  140. MTYPE_DISKCHANGE  EQU   3  ; dos telling us of a disk change
  141. MTYPE_TIMER       EQU   4  ; we got a timer tick
  142. MTYPE_CLOSEDOWN   EQU   5  ; <unimplemented>
  143. MTYPE_IOPROC      EQU   6  ; <unimplemented>
  144.  
  145. ; we use the gadget id field to encode some special information
  146. GID_WBOBJECT      EQU   0  ; a normal workbench object
  147. GID_HORIZSCROLL   EQU   1  ; the horizontal scroll gadget for a drawer
  148. GID_VERTSCROLL    EQU   2  ; the vertical scroll gadget for a drawer
  149. GID_LEFTSCROLL    EQU   3  ; move one window left
  150. GID_RIGHTSCROLL   EQU   4  ; move one window right
  151. GID_UPSCROLL      EQU   5  ; move one window up
  152. GID_DOWNSCROLL    EQU   6  ; move one window down
  153. GID_NAME          EQU   7  ; the name field for an object
  154.  
  155.  
  156. * workbench does different complement modes for its gadgets.
  157. * It supports separate images, complement mode, and backfill mode.
  158. * The first two are identical to intuitions GADGIMAGE and GADGHCOMP.
  159. * backfill is similar to GADGHCOMP, but the region outside of the
  160. * image (which normally would be color three when complemented)
  161. * is flood-filled to color zero.
  162. *
  163. GADGBACKFILL      EQU   $0001
  164.  
  165. * if an icon does not really live anywhere, set its current position
  166. * to here
  167. *
  168. NO_ICON_POSITION  EQU   ($80000000)
  169.